﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BGCMS.Models.Question>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Svara fyrirspurn
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%: Model.Title %></h2>

    <div id="question">
        <%= System.Web.HttpUtility.HtmlDecode(Model.Question1) %>
    </div>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
       
        <div class="editor-label">
            <label for = "Answer">Svara spurningu</label>
        </div>
        <div class="editor-field">
            <textarea id="Answer" name="Answer" rows="8" cols="30"><%= Model.Answer %></textarea>
        </div>

        <% if (Model.IsPrivate == false) { %>
            <div class="editor-field">
                    <%: Html.CheckBoxFor(model => model.IsPublished)%>
                    <%: Html.ValidationMessageFor(model => model.IsPublished)%>
                    Veldu ef spurningin á að birtast á síðunni
            </div>
        <% } %>
        <p>
            <input type="submit" value="Senda svar" />
        </p>

    <% } %>

    <div>
        <a href="javascript: history.go(-1)">Til baka</a>
    </div>

</asp:Content>

